//
// Unihan Input Method
//
// Copyright © 2002-2007 Sun Wah Linux Ltd.
//
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
// USA
//
// $Id: IME.h 757 2007-05-10 08:19:31Z roger $
//

/* FILE : IME.h */
#ifndef _IME_H
#define _IME_H

#define IME_VERSION "1.0"

extern IMM_Functions *immf;

void IME_initialize			(void);

void IME_finalize			(void);

int IME_get_number_of_input_methods	(void);

IME_Bool IME_get_input_method_info	(int index,
					 IME_InputMethod *info);

IME_Bool IME_create_input_context	(IME_InputContext *ic);

void IME_destroy_input_context		(IME_InputContext *ic);

IME_Bool IME_process_key_event		(const IME_InputContext *ic,
					 const IME_KeyEvent *key);

void IME_process_helper_event		(const IME_InputContext *ic,
					 const char *helper_uuid,
					 const void *buf,
					 size_t buf_size);

void IME_focus_in			(const IME_InputContext *ic);

void IME_focus_out			(const IME_InputContext *ic);

void IME_reset				(const IME_InputContext   *ic);

void IME_move_preedit_caret		(const IME_InputContext   *ic,
					 int position);
 
void IME_select_candidate		(const IME_InputContext   *ic,
					 int index);

void IME_previous_candidates_page	(const IME_InputContext   *ic);

void IME_next_candidates_page		(const IME_InputContext   *ic);

void IME_update_candidates_page_size	(const IME_InputContext   *ic,
					 int size);

void IME_trigger_property		(const IME_InputContext   *ic,
					 const char *property);

void IME_reload_config			(void);

#endif /* _IME_H */

// vi:ts=4:nowrap:cin:expandtab
